Com. IBM. db2.jdbc. db2exception: [IBM] [CLI driver] [DB2/NT] sql0911n has rolled back the current transaction due to a deadlock or timeout. Cause code "2 ". Sqlstate = 40001
Solutions provided by IBM for this problem
This problem may be caused by the DB2
DB2 is primarily used in large-scale applications, with better scalability and support from mainframe to single-user environments. DB2 provides high-level data utilization, integrity, security, recoverability. This article mainly introduces the DB2 deadlock resolution process full record, this article caused the
The following articles describe the two basic cases of comprehensive analysis of DB2 deadlock and lock wait. If you are interested in the two basic situations of DB2 deadlock and lock wait, you can click to view the following articles. Locks are introduced by databases to control the integrity of concurrent data.
Locks
The following articles describe the two situations of DB2 deadlock and lock wait. A lock is a database that generally introduces an operation mechanism to control the integrity of concurrent data, locks are not terrible in concurrent applications. locks are usually divided into two types: deadlock and lock wait.
The deadlock
blockSystem.out.println ("interruptered"); } return"Haha"; } }); Executor.execute (Futuretask); //There's something else you can do here.String result=NULL; Try{result= Futuretask.get (Timeunit.milliseconds);//The result is obtained, and the timeout execution time is set at 5 seconds. You can also use Future.get (), do not set the execution timeout time to g
transactionTRX_REQUESTED_LOCK_ID: The lock ID of the waiting transactionTrx_wait_started: The start time of the transaction waitTrx_weight: The weight of the transaction, which reflects the number of rows modified and locked by a transaction, the smaller the weight value is rolled back when a deadlock is found to be rolled backThe process ID in Trx_mysql_thread_id:mysql, corresponding to the ID value in show processlistTrx_query: SQL statement run by
The database used in the production environment is DB2. But lately there's been a strange deadlock phenomenon: a SELECT SQL statement always has a deadlock.
According to past experience, it is usually the problem of update/delete such as updating SQL statements that will cause deadlocks. And this select SQL statement is a very common SQL, without any large amoun
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.